#ifndef RESPONSE_H
#define RESPONSE_H

#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/select.h>
#include <sys/time.h>
#include <sys/mman.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <arpa/inet.h>
#include <signal.h>
#include <fcntl.h>
#include "parse.h"
#include "log.h"

#define ECHO_PORT               9999
#define BUF_SIZE                4096
#define TYPE_LEN		        64
#define RESPONSE_HEADER_SIZE	8192
#define RESPONSE_BODY_SIZE	    8192
#define BUF_SIZE                4096
#define TYPE_LEN                64
#define FILE_PATH_SIZE		    1024

int send_get_header(int client_sock, Request *request);
void parse_file_type(char *filename, char *file_type);
void parse_request(int client_sock, char* buf, ssize_t readret);

#endif